package com.linkage.educloud.ah.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 传递图片统一对象 比如：查看大图等等
 * Created by Mr'Tang on 2018/9/18.
 */

public class PicItem implements Parcelable {
    private String url;
    private int position;

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public int getPosition() {
        return position;
    }

    public void setPosition(int position) {
        this.position = position;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.url);
        dest.writeInt(this.position);
    }

    public PicItem(String url, int position) {
        super();
        this.url = url;
        this.position = position;
    }

    protected PicItem(Parcel in) {
        this.url = in.readString();
        this.position = in.readInt();
    }

    public static final Parcelable.Creator<PicItem> CREATOR = new Parcelable.Creator<PicItem>() {
        @Override
        public PicItem createFromParcel(Parcel source) {
            return new PicItem(source);
        }

        @Override
        public PicItem[] newArray(int size) {
            return new PicItem[size];
        }
    };
}

